<template>
  <div>
     <header class="header" >
      <h1>todos</h1>
      <input class="new-todo" placeholder="请输入任务名称" autofocus  @keyup.enter="addList" v-model.trim="contentList" />
    </header>
   </div>
</template>
 
<script>
export default {
  name:
    "TodoListHearder"
  ,
  components: {},
  props: {},
  data() {
    return {
      contentList:''
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    addList(){
      this.contentList&&this.$emit('addList',this.contentList)
      this.contentList=''
    }
  }
};
</script>

<style scoped>
     
</style>